Cleans up Command hierarchy

Now, commands can clean up any resource, not
just a prepared statement. Also, the prepared statement
and other common command attributes are pushed into base classes
that the other commands extend.