Refactor test setup for XBlock rendering and handlers.

This should provide a more convenient interface for view-level testing of the XBlock.

@stephensanchez