Merge pull request #1962 from scenari/develop

#1959
Working to fix issue #1963

Now we should convert each method in function…
Fixed issue #1938
Fixed test case in issue #1938
#1958 OMemoryWatchDog issue : WeakHashMap used for listeners

Proposed solution: the returned Listener by
OMemoryWatchDog.addListener() is the wrapper. The caller MUST reference
this returned wrapper with a strong ref.
Merge branch 'develop' of https://github.com/orientechnologies/orientdb into develop