add utils.toError and tests
Db#wrap now uses utils.toError
utilize utils.toError
deprecate db#wrap
Merge remote-tracking branch 'aheckmann/toError'