V25 support

Not sure if you are interested for the PR but thought I did it anyway.

I added support for v25 protocol aka OrientDB2.0-M1. Also cleaned up the code a bit. 
Don't know how you feel about the usage of var, but it's my choice across all my projects.

All tests are passing for OrientDB 1.7, all but 1 I am looking into for 2.0