Rename Lockfile#update_dependencies to update
Sort dependencies before writing them to lock
Handle the edge case where an item is not in the graph

If an item is "unlocked" that is a dependency in the lockfile, but was
never contributed to the graph, all hell breaks loose. This commit
fixes that edge case.
Remove docs for Lockfile#to_s and Lockfile#inspect
Remove Lockfile#to_hash and Lockfile#to_json
Update lockfile specs to the new format