Fix code injection of fancy objects and PImages

Summary:
This fixes the stubbing code for 2 new test cases-
an object with a PImage inside it, and a not-plain-object inside an object.

Test Plan: - Run output_test.js with 2 new test cases

Reviewers: john

Reviewed By: john

Subscribers: #cs

Differential Revision: http://phabricator.khanacademy.org/D13473