Network enhancements

Network enhancements split out from https://github.com/xbmc/xbmc/pull/128