CRM-15104 fixed some issues with line items creating participants with the API

When you create a participant using the API, and this participant has a fee_level with multiple price field values, the api creates an incorrect line item. This pull request contains a unit test and a fix.