[!!!][API] GetConnection() throws exception if failed

Modified GetConnection() to throw a generic exception (code #999) if the connection has not been opened. This is a breaking change and all code which implements this method must be wrapped in a try-catch block.
[BUGFIX] GetByType() fatal error

Fixed fatal error caused by GetByType() crashing when $this->database->GetConnection() is called on an unopened connection. GetByType() will now catch all exceptions (including the one thrown by GetConnection()) and will call the Connect() method to establish a connection. Note: Connect() can freely be called as it will only open a connection if one has not already been opened.