Use AR relations to save fields/inputs and values

Instead of saving/destroying fields/inputs and values one at time
Use the Active Record relations to save these with a single save
call on the parent. This is done by adding the :autosave to the has_many
relations

It also includes the removal of to_i calls on the id fields. This will
help us when we switch to GIT and have strings as id's and the to_i
calls would fail
@Fryguy 
The CFME UI displays values in the priority order of the fields. So the controller builds a separate ae_values based on the field priority (see get_instances_form_vars line 2439), that is the first parameter to the function. the original_values is the one that we get from the relation. It allows me to update the objects in the relation directly which can be saved. This is the workaround that Aaron had mentioned today updating it in place.