Added api.compact to HttpPouch

Also replaced ajax call to _compact with newly written api.compact
Merge pull request #365 from benrudolph/apicompact

Added api.compact to HttpPouch