Refactoring libcontainer to avoid cyclic dependencies in the future.

This change will make future work inside libcontainer easier since the API is separated from the internal implementation.
That is possible in the current state because we pass in some of the Network arguments through 'Context'. But once we clean up the use of Context, we can do that as well.