Fix possible infinite wait on prepare error.

If multiple goroutines try to prepare the same statement at the
same time and the goroutine which prepares the statement errors
it will never release the other goroutines from the waitgroup
wait.

Fix this by storing the error and info in a struct and always
call WaitGroup.Done()
Delete the prep info struct if it failed to prepare
Merge pull request #84 from Zariel/prep-cache-errors

Fix possible infinite wait on prepare error.