Improved tests. Fixed database tests. Related to: https://github.com/openpeer/op-identity-provider-server-php/issues/51