Dev getpdostatement

Code for j4mie/idiorm#84, includes documentation. Compatible with previous pull for `raw_execute()`. Ended up following @featureless's code suggestion quite closely.