More work on positioning frames

This work ties up a few remarks from #423 and continues on that work by making the tests simpler and adding support for horizontal-pos="left" and vertical-pos="top".