Move the PeerPtr declaration out of types.h

This belongs in peer.h instead, since types.h is included in lots
of places that should not drag the peer deps in. Also, this caused
problems (circular deps?) when building the OSX notification backend.