Ability to wait for other instances to finish

Introduces the ability to wait for other instances to finish their
execution, instead of instantly aborting in this condition. This
feature is implemented by specifying a maximum number of minutes
to wait for the lockfile to be freed.

When set to 0 (default), the previous behavior is unchanged.