Use #to_pson to generate PHP values

This patch exploits similarities between JSON and PHP syntax to simplify the
code for generating PHP code and to make keep capable of representing
arbitrarily nested values.

Change-Id: I284b38710e2537dd8bd3eb4ef32eb468f0c35931