Change controller generator template

Now it is more like the rails 4 controller template, using
before_(filter|action) to set the instance variable @resource and with
strong parameters.