Fix a memory leak with the new in-database SVN cert storage.
Fix a memory leak with the new in-database SVN cert storage.

The new SVN cert support introduced a memory leak due to a circular
dependency.

The client was holding on to a reference to the function on SVNTool,
while SVNTool was holding on to the client, preventing either from being
cleaned up.

An attempt was made at inlining the function, but as that accessed data
bound to the class, the circular dependency remained.

This appears to be an issue specifically with PySVN, as an independent
repro case could be devised for pysvn.Client's callbacks, but not those
from a mock object.

The callback is now defined as a classmethod and the only attribute it
needs, a repository, is set up as a weakptr which is then accessed by a
lambda calling the callback. This prevents the repository and SVNTool
from remaining around indefinitely.

chipx86/reviewboard,bkochendorfer/reviewboard,chipx86/reviewboard,1tush/reviewboard,brennie/reviewboard,1tush/reviewboard,beol/reviewboard,1tush/reviewboard,custode/reviewboard,custode/reviewboard,brennie/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,davidt/reviewboard,davidt/reviewboard,bkochendorfer/reviewboard,reviewboard/reviewboard,1tush/reviewboard,chipx86/reviewboard,chipx86/reviewboard,brennie/reviewboard,custode/reviewboard,1tush/reviewboard,1tush/reviewboard,custode/reviewboard,reviewboard/reviewboard,beol/reviewboard,reviewboard/reviewboard,1tush/reviewboard,brennie/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,reviewboard/reviewboard,KnowNo/reviewboard,bkochendorfer/reviewboard,davidt/reviewboard,1tush/reviewboard,beol/reviewboard,sgallagher/reviewboard,beol/reviewboard,bkochendorfer/reviewboard,davidt/reviewboard,KnowNo/reviewboard,sgallagher/reviewboard,1tush/reviewboard