Added output() to PHP/public_functions.php

Instead of various different $noverbose=false checks, this output
function takes verbose=0/1 from $arguments, and allows for different
formats (JSON, XML, PHP). This works very well with api.php.

To start, publicTest has been added, and a few functions started to have
standard documentation.