update capture template methods to properly capture nested content

This updates the `capture_*` methods to all have a similar implementations
and all capture any nested block content using the same approach.
This renames the prev `capture` method to be `erb_write` as this
is a more appropriate name.

This updates the tests to make them more readable and to make them
fully test the nested block content behavior.