Change grid provider interface

This fixes an issue where unreflected usage leads
to segfault: If &myGrid is passed to grid provider,
the destructor of shared_ptr will try and delete
myGrid, which is usually not desired the behavior.