move heartbeat into lua script
correct lock not exists error message
improve unknown error code message
change error code for "impossible" error
bugfix: heartbeat set wrong timeout
move code from __init__ to methods