Don't rely on JSON.parse() for page.evaluate().

https://github.com/ariya/phantomjs/issues/12615
Port more tests from webpage-spec.

https://github.com/ariya/phantomjs/issues/12439
Fix passing date as argument to page.evaluate().

https://github.com/ariya/phantomjs/issues/12615