pytgl: Add net_methods and mtproto_methods callbacks.