Restframe UV-to-optical spectroscopy of APM 08279+5255: BAL classification and black hole mass estimates