Proper auth, code cleanup

Changes (auth):
- Added scrypt dependency
- Added database support for storing usernames and hashed passwords
- Added API for properly validating user accounts
- Added admin page and first-time account creation

Changes (cleanup):
- Added macros for database layer to simplify code
- Cleaned up template generation for certain edge cases (no posts)
- URL links for tags are now properly URL-encoded