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
I feel like this can be done more efficiently that constantly scanning the Array in a loop...perhaps something like this:

```ruby
indexed_ae_fields = ae_class.ae_fields.index_by(&:name)
@edit[:new][:fields_list].each_with_index do |f, i|
  fname = f.split('(').last.split(')').first # leave display name and parenthesis out
  indexed_ae_fields[fname].try(:priority=, i + 1)
end
```