Add a multidimensional (cartesian) iterator

Closes #1917, closes #6437
Make the output of setindex! for SharedArrays consistent with other implementations
Make type-construction more modular

See https://github.com/JuliaLang/julia/pull/8432#issuecomment-62536295
Rework iteration using stagedfunctions
fix type inference for iteration with stagedfunction
Move AbstractArray traits earlier to avoid overwriting `start`

This prevents a build warning
Avoid confusion with start(::Tuple) iteration
Fix OSX permissions
Merge pull request #9018 from JuliaLang/sf/osxperms

Fix OSX permissions
Merge pull request #8432 from JuliaLang/teh/cartesian_iteration

Efficient cartesian iteration (new version of #6437)
Moving unix-only tmp functions into a single block
Re-enable disabled tmp tests

Appears to have been disabled since
02a6aaba79a379228805c76fb62e3b99496e6b23, or, for about two years.
Variable renaming to resolve conflicts with newer code.
f(::Function) variants for `mktemp` and `mktempdir`