Fix the passing of a pointer from the Application during its
construction to the Context it is allocating... basically I shouldn't
have been trying to use fancy smart pointers because that led to
automatic destruction and hence double-frees