librenms: minor fixes to phpdump

Handle integers properly, NULL & strings with embedded quotes. Borrowed
from Ori's equivalent code that was developed before this but was never
imported into this repo.

Change-Id: I36dfd0f082ed48f62c537283ed24017f1ac8ada1