Clean up packet interface with enum, remove XHR transport, remove json
deps, make delegate references weak, use modern objective c syntax for
properties.