• Implement `AsHandle` and `AsHandleMut` traits.

    Several types in rust-mozjs, such as Heap, PersistentRooted, and RootedGuard, represent a rooted
    value. A common property of rooted values is that a handle can be obtained to it. Rather than
    implement this property separately for each of these types, we should abstract it out into these
    two traits.
    
    This has several advantages: for instance, one can write functions that take any rooted value as
    argument, regardless of how it is implemented, and then obtain a handle to it. Additionally, it
    allows one to implement these traits for newtypes which underlying type is a rooted value.
    ejpbruel committed Nov 22, 2016