Comment 0 for bug 1503730

At the moment if you "new" a bound class from within JS it returns a raw pointer to the allocated memory. This makes things really complicated when trying to pass those objects into a methods that take shared_ptr arguments. We should be creating a shared_ptr upon construction and passing that back to JS. This naturally also gives us better lifecycle control of these objects between JS and C++.