Change shared_ptr to references and use keep_alive
Created by: gcarleo
This PR provides a minimal solution to the problem of consistently using references on the C++ side, while keeping them alive on the Python side.
It basically reverts #105 , and provides a minimal alternative to #123.
Documentation for keep_alive