Set active, recv for low level access as BOSH

I've tried to mimic the BOSH code as much as possible. Wasn't sure if some functions (shared by tcp and bosh now) should be generalized out to escalus_utils or something.