(maint) Handle empty or malformed JSON lockfiles

If a JSON lockfile was empty or had malformed JSON, it would raise a
PSON::ParserError and could lead to application failures with an unclear
cause. This commit changes the JSON lockfile behavior to treat empty or
malformed file contents to be nil and generate warnings when the file
contents are malformed JSON.
Merge pull request #2097 from adrienthebo/maint-empty-lockfile

(maint) Handle empty or malformed JSON lockfiles