Refactored procedural code to object-oriented.

All functions in the functions.inc.php file have been moved to either the User, Post, or Riff objects.
Removed the require_once("functions.php") line because functions is gone.
Fixed bug in User::create()
Fixed misspelled calls to User::is_login_valid()
Fixed extensions for upvote api and fixed bug in add-upvote.
Merge pull request #4 from rfotino/refactor-to-oop

Refactor procedural style to object-oriented, refs #3