#86: Fix assorted samples to work against the new cleaner JSON APIs.

Also fix mapcontroller.php to properly handle empty selection set rendering.
PDF plotting fixes.
 - Fix incorrect startLayer() call (I overlooked a problem introduced in 6f613d2)
 - Re-introduce setting PDF mime type