lib: Move tdb lock timeout fns to source3