Rewrite set_pv, avoid partially updating values on error

Either the entire input is converted from Python types and updated
successsfully, or no change to the internal data structures occur.

Also, should be a little bit more lightweight due to using
PySequence_Fast to eliminate need for bounds checking in loop.