Make some MySQL errors retryable

I've found useful for the autoreconnection library to survive MySQL restarts. IsNetErr is not a good name for the function anymore. It should be IsRetryableErr. But since it was exported, I didn't rename it.