Make nested Handler classes static with weak references to their outer classes