Closes a database. Closing a database will stop all replicators, live queries and all listeners attached to it.
Throws an exception if any error occurs during the operation.