Make decorators work with instance methods

This commit modifies the all_requests and urlmatch decorators so that their
targets can be either functions or methods.