locking & bug  fixes, Prepared statement deletion

1) Optimiize Locking in Session Handle
2) Bug fixes
3) delete statements taking transactions into account
4) Move code to sessionImpl to avoid duplication
5) remove c++11 mode
6) acquire locks in public methods, work done in private methods w/o
locks