Abort pending postgis connections when exception occurs
  - patch from @abonnasseau
  - closes #2042
  - refs #2069