Generational behavior for the garbage collector

Same as #5227 but living in this repo & squashed.

there's an implementation of ntz (aka ctz) in libsupport:
https://github.com/JuliaLang/julia/blob/6ad8410abe3d9fa4b54e6844daa67a4d8a3b5762/src/support/bitvector.c#L84

wikipedia gives a list of transformations for easily converting from one formula to another in various ways:
http://en.wikipedia.org/wiki/Find_first_set#Properties_and_relations