Misc updates

I merged with your current version of dev-2.0 and ran into some problem that should be fixed. 

First:
 _lastSQL was only getting updated occasionally now. I've changed all cmd.Execute* calls to use helper functions that properly call OnPreExecute so the trace variables get maintained. 

Second: 
Wired up some unit tests and support for Composite Primary keys most of the problems were with IsNes and Save.