Fixed race condition in poll implementation

Also fixed issues with wrong destructor selection for statefs::Provider, made BranchStorage a member of a BranchWrapper instead of inheriting - mutliply inheritance in this case is evil