Moved lock module to pulp-common

https://bugzilla.redhat.com/show_bug.cgi?id=1096965

Shared by CLI commands and agent handlers.