CRM-14197: Fix for UI_line_item_value index, prettified query

Moved the update of UI_line_item_value index to after the key field being added to index is filled.

Modified a query to make alias for civicrm_line_item table consistent with other queries, added tablename alias to fields in SET clause.

Note: this pull request is untested, and is intended to provide details instead of text explanation.