Fixed get_partial raising an error

get_partial would throw an error when no partial was found.
Now it just returns an empty StringIO (and thus an empty partial).
get_key now defaults to ''

Instead of return None, get_key now returns an empty string.

Also wrapped get_key calls in str
Fixed IndexError on scopes

If there are no scopes it defaults to None
Began fixing standalones

* stopped closing the file, instead use a variable
  so I can reach the end of the file and seek back

* moved literal yielding to the end of the tokenize function
  so I can remove whitespace from it if it's before a standalone

* stopped set_delimiter? from continuing the while loop
  so I can handle the standalone

* added standalone handling, which checks the left and the right
  parts of every tag to see if it's all alone on a line. And if so
  it will edit the whitespace in the literals
Fix html escape.

Fixed typo in original escaping commit:

    44d86498c405d0226cdb8e092bb9f2140960474a

Somehow $ and & got swapped.