re-pcre: Implement count arg to re.sub().
functools: Add dummy update_wrapper(), wraps().
sqlite3: Add .close() methods, better error checking and reporting.