Fix failed searches of just parentheses

If the query were just parentheses, like ")(",
l2cs.convert would return an empty string, causing
the subsequent search to fail. This moves the empty
query check later in the code to avoid that issue.

fixes reddit/reddit#618
Encode gold gift messages as UTF-8

fixes reddit/reddit#612
ipn.py: Clean up imports
Remove unused and broken verify_ipn()