Fix multiple test-suite failures

This moves rotation constraints into the view in order to fix headless rendering and the other use cases mentioned in #458. This probably also fixes #463.

Along the way refactored rendering somewhat and addressed #491.

cc @kkaefer