Rewrite <font> tags when cleaning tree.

* Converts to <span>.
Only remove whitespace nodes if between blocks.

* When cleaning the tree we want to remove useless whitespace between block
  nodes, but we were being a bit too aggressive and removing all whitespace
  nodes. Now checks the context first.
Remove empty inline nodes on paste.
Rewrite all <br>s in cleanupBRs fn.

Previously, we were just removing <br>s that didn't have siblings on both sides. A better test is whether the containing block has any non-whitespace text content. If it does, the <br> is a line break and we can just split the block. If it doesn't though, we need to leave the <br> as a placeholder, to ensure the block doesn't collapse to 0 height.
Fix allowed block regexp.

 * Was not correctly matching full string only.
Save undo step on delete.

* But only if it's deleting whitespace or destroying a block or deleting a
  selection. This makes it undo deletion word-by-word rather than
  character-by-character.
Add accurate check for whether <br> breaks line.

When cleaning up <br> elements, we need to accurately determine whether there's
text before and after it in the block to know whether it will introduce a
visible line break.