Compact all shared helpers in a single module

Also introduce an internal ButtonTo class to override the button_to
method from Rails, taking care of the difference between Rails 3 and
Rails 4: only in Rails >=4 `button_to` accepts the content as a block.