CRM-13179 fix profile api to support multiple profiles incl billing.

As it is non-standard I've had to be a bit hacky - since there are tests we need to ensure code relying on the non-standard behaviour doesn't break