(#3757) Implement json-based lockfiles
This commit does the following:
- Refactors our main lockfile class to accept a data object as an argument to the #lock method. This data can then be retrieved at any time while the lock is held; the implementation is to write the hash as JSON to the lockfile. This will allow external tools to read it without calling into puppet code.
- Refactor pidlock to use the above--but only serializing a String (the pid) to the file.
- Refactor disabler to use the above, with a Hash containing a key/value pair identifying the "disabled" message.
- Fix and clean up spec tests.