Massive cleanup

* PHPDoc for everything
* Use the word "custom" instead of "alternate" (which was
grammatically questionable)
* Split some of the set/delete stuff into API methods
* Explicitly set target=_blank, ignoring what exists in postmeta