Consistently change "program" to "broadcasts" throughout PVR JSON-RPC.
Fix some linebreaks, NULL pointer checks and logical errors.