Profile: cache code address lookups in a dict

This greatly improves the performance of Profile.print()
Profile: extract portable profiling results (Profile.retrieve())

By switching from Uint to templated functions, this should work
across machines with different word sizes.
Profile: improve docs
Pkg2: some tweaks I've had lying around forever.
Pkg2.{checkout,release}: factor out a little common checkout code.
fix #3896
Merge branch 'master' of github.com:JuliaLang/julia into jb/newvars
get sysimg building with new binding behavior (ref #1571)

the most problematic change was forcing for loop variables to be loop-local,
instead of reusing existing local vars. for example

    local i
    for i = 1:2
    end
    return i

currently works and returns 2.

for now, the behavior is to introduce new variables for each iteration unless
we are overwriting an existing local. comprehensions, however, always
introduce fresh variables and never overwrite existing ones.