Fix stupid broken DFS, and classify some socket-related functions.
Add value text caching for global variables -- this was taking a large proportion of runtime for date because PB was recording the stdio_streams global each time.

Also fix a bug where loops could falsely iterate if their optimistic edge was killed as well as their backedge.