fix test errors by using standalone rpc proxy more sensibly
standalone rpc proxy should close its connection when the provider unregisters
+ pyflakes