{{action}} will target a templates controller

This is a rebased version of #1631 from @trek
~~
If a function whose name matches an an action is implemented on
a templates controller, that method will be called instead of
delegating the action to the application's current state.

Not sure why a check of `hasOwnProperty` was used, but
it prevented this new behavior from occurring.