Better placement of absolutely-positioned elements (#721)

When an element is positioned absolutely without specifying
the top/right/bottom/left properties (or when those
properties are set to "auto") it should now be placed on the
page according to where it would fall in the normal document
flow. The positioning code also now searches for a block-level
parent element rather than assume that the containing element
is a block-level element.
Simplified last commit