database/sql: refcounting and lifetime fixes

Simplifies the contract for Driver.Stmt.Close in
the process of fixing issue 3865.

Fixes issue 3865
Update issue 4459 (maybe fixes it; uninvestigated)

R=golang-dev, rsc
CC=golang-dev
https://codereview.appspot.com/7363043