Fix position of child nodes of selected elements
Add callback option for resize event
Refactor nodeCollection
Simplify selection of nodes

Rather than flattening out everything, we now only flatten out the
top-level nodes and preserve their internal structure. This solves the
problem of bad reflowing when taking nodes out of the regular flow to
flatten them. Also gives much lighter final HTML markup.