fixed wrong unlock that could bring to record never unlocked. issue #2866

Conflicts:
	core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLSelect.java
fixed first case of multithreading lock implementation. issue #2866

Conflicts:
	core/src/main/java/com/orientechnologies/orient/core/sql/OCommandExecutorSQLSelect.java
refactor for improve record locking.

Conflicts:
	core/src/main/java/com/orientechnologies/orient/core/storage/OStorageEmbedded.java
	core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OAbstractPaginatedStorage.java
Merge branch '1.7.10' of github.com:orientechnologies/orientdb into 1.7.10