Use of boost::make_shared in qana

Code simplification using implicit conversion from
derived class to base class.
Use of boost::make_shared in query

Third pass.