3.0 - Show SQL when exception happens

This restores the feature of showing the bad SQL when a PDO exception happens. Also contains a small memory optimization for ResultSet
Ah I misread the surrounding context.