ZOMG, big commit.

- Fixed the sorting and pagination, gave variables much more meaningful names, reduced variables used
- functions-html.php is now i10n ready
- Added basic phpdoc to functions-html.php while I was at it

git-svn-id: http://yourls.googlecode.com/svn/trunk@853 12232710-3e20-11de-b438-597f59cd7555