generalized fix on dobule connection release.
Merge branch 'develop' of github.com:orientechnologies/orientdb into develop