Move hgsprintf to libphutil

Summary: For simpler linting. Also fix an issue where we throw when loading a library with an out-of-date file in its map.

Test Plan: unit

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D5059