Clean up code so that UPnP implementation does not need to include all the HTTP functionality. In addition, make it easier to share HTTP server functionality with other components in the future.