Cleanup build_tag_map

Millions of temp variables. Assuming there's only two sorting methods. Grammar.
[show 100 more problems]
Relevance sorting method
Config option for which tags to ignore
Tag Category integration
Polish
Extra-switch fixes

Wrong variable name, and don't do the math unless we have to.
Fixed the diplayed number being wrong.
Also fixed a corner case where number of tags in the cloud equals number to
display. Would display "[show 0 more tags]".
Fix another corner case

If $counter == $def_count and the next tag in the list is a used tag, the
tagcloud_extra div would be printed twice, breaking the list.

This solution feels ugly, perhaps there's a better way to do this?
Use API calls
Properly escape tags while building query

Could it really be that easy?
Fixed tags with quotes killing the Javascript

Of course not.
Merge pull request #324 from justinbrewer/editcloud_revamp

Tag Edit Cloud improvements