Closing the Loop for Edge Detection and Object Proposals