Refs #55, creates an uninstall script for the database.

ryff.sql has been moved to resources/db/install.sql, and is accompanied by resources/db/uninstall.sql. The create database and use  syntax are no longer in the install script, so that it can be used for either the main or test database.

connect-db.php no longer includes config.php, that is done in global.php. connect-db will connect to the test database instead if TEST_MODE is defined and truthy.

A lot of documentation has been added to SQL scripts, the config file, the
global file, and the connect database file. The formatting on the foreign key constraints has also been changed in install.sql.
Refs #55, changes uninstall script to remove all tables automatically.
Refs #55, updates uninstall.sql to handle a database with no tables.

Also adds some comments to the uninstall.sql script.
Refs #54 and #55, adds an abstract TestEnvironment class and a UnitTestEnvironment stub.

The tests/unit-tests.php script will create a test environment, run some unit tests, and then tear down the test environment. TestEnvironment will also be subclassed in #55 as an environment from which to input a lot of fake test data. The TestEnvironment's get_word() function can be used to get a random word from words.txt.
Refs #54, adds unit tests for User, Follow, Post, and Upvote.

Also fixes a bug in the Post model found during testing.
Refs #54, adds unit tests for updating users, adding post tags, and adding/removing user tags.
Refs #54, adds Conversation and Message unit tests.
Refs #54, adds Notification unit tests.

Changes Notification::get_latest() to accept an option user_id parameter, so that the current user doesn't have to be set. Also fixes TestEnvironment's do_test() method's output by adding ob_end_clean().

Post::delete() is not called at the end of test functions, if User::delete() is called instead (because the deletion will cascade).
Refs #54 and #55, consolidates test scripts as resources/tests/tests.php.

Creates a stub for the populate tests, and renames UnitTestEnvironment to UnitTests. Adds --help and --type command-line options to the tests.php script.
Refs #54, uses lock file for tests script.

This prevents concurrent setup/teardown of the test database.
Refs #55, adds number of cycles to PopulateTests.
Moves get_from_date() to new Util model.

The same code was being used in UserFeed, PostFeed, and get-tags-trending. This consolidates it, and changes the interface of Tag::get_trending() to accept day, week, month, or all, instead of an SQL timestamp.
Refs #55, adds get_unique_word() and moves get_test_user(), get_test_post() to TestEnvironment.

get_unique_word() will be used for usernames and emails, since they have to be unique. get_test_post() has been reworked to take an array of tags and an array of usernames to mention. The memory limit has been set to 1024MB in test-environment.class.php, because initializing all of the words takes up a lot of memory.
Refs #55, adds test media and sample media folders.

The test media folder is set as another variable and is used globally when TEST_MODE is set to true in config.php. The sample media folder should be filled by the user, right now it just has one empty file of each type. This will be the pool of files used when running the populate test script and other test scripts.
Refs #55, adds some populate tests and improves data generation in TestEnvironment.

Added a chance() function to TestEnvironment, so given a number between 0 and 1, it will return true with a given probability. Improved the randomness with which users are generated. Changed rand() to mt_rand() everywhere.
Refs #55, adds Posts, Upvotes, and Stars to populate tests.
Refs #55, adds Conversations and Messages to populate tests.
Refs #55, adds sample media to populate test.
Merge pull request #61 from RyffProject/feature/tests

Refs #54 and #55, adds unit and populate tests.