Bug 836968 - Cache shapes for JSON objects and assign types to constructed JSON objects and arrays, r=waldo,jandem.