SERVER-7636 Do not use cached connection when read preference changes
SERVER-8553: fix v8 error checking and exception handling