Port to LSB+Debian init script functions

This may break on other distros.
Support /var/run as lock file destination and make sure it exists at startup
Add timeout option