Network extensions

@tiborvass @shykes @icecrime these patches get docker closer to building. Please merge asap, but I've tried to split this into logical parts so it can be reverted independently as you guys find time to move forward, allowing us to keep moving.