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
@matthewd : the fact that we cannot see an immediate thread of allowing arbitrary stuff for the find does not mean it's safe. To `find`, you can for example pass `conditions` with SQL fragments, that would be a fun option to explore if I was trying to exploit this. Then of course code moves around as more people work on the project. Also Rails change over the time and several times already "interesting" stuff was found in the code. Such omnipotent function as the `find` is surely error prone.