fix layout of float elements, fixes #254

Ensure that floated elements are fully enclosed by the block's main
container.
hange block positions after removals, fixes #250

When a block was removed, the positions on all following blocks on
the same level were not updated. Therefore, new blocks have been
inserted on wrong positions.