Fixed missing space in LIMIT clause. Fixed tearDown() in tests.

Created 2 new static methods reset_config() and reset_db(). They are
used in tests to make sure to reset what the static methods uses in
between tests.
Added missing documentation for reset_config()