Make sync_trait weakref callback into function (#69)

This is a quick fix for #69. Essentially, the fix is to make the weakref callback for the synced objects into a local function instead of a `HasTraits` member.

This PR includes #134, since fixing the reference cycles meant that the issue in #131 also started appearing for mutual syncing.