Small fix for cowboy 0.9.0:
 - peer_addr/1 -> peer/1
 - peer/1 return type (now {Addr, Port})
rebased two commits into one