Add an after_bundle callback in Rails templates

Closes #16292.

The following Rails template (taken from the Rails guides) does not work well with binstubs:

```ruby
# template.rb
generate(:scaffold, "person name:string")
route "root to: 'people#index'"
rake("db:migrate")
 
git :init
git add: "."
git commit: %Q{ -m 'Initial commit' }
```

Since it is executed before Bundler and Spring binstub generation, the generated stubs are not added to version control. Executing the templates later wouldn't work either – that way it won't be able to add gems.

Adding an `after_bundle` callback seems to solve the issue. That way, the version control commands can be postponed after the binstubs have been generated:

```ruby
# template.rb
generate(:scaffold, "person name:string")
route "root to: 'people#index'"
rake("db:migrate")
 
after_bundle do
  git :init
  git add: "."
  git commit: %Q{ -m 'Initial commit' }
end
```

This pull request implements that callback. The test is a mouthful – I'm open to suggestions for improvements :smile: 

/cc @senny 
> given that the surrounding tests use the same pattern I don't think we need to tackle this in the same PR

Ah fair point :+1: