Fix wraps handing of missing attrs. (#251)

This is pretty-much a straight backport of Py3 implementations of update_wrapper and (privately) wraps.

Fixes #250 
Fixes #165

Co-authored-by: Benjamin Peterson <benjamin@python.org>
3 files changed