Lock timeout made modificable

Made possible to change locking timeout through LockType definition.
Also added MAX_TIMEOUT and DEFAULT_TIMEOUT to interfaces so they can be used from external packages that defines their own LockType like iterate does.