Change the object-iteration api to forEachObject(lambda)

Summary: Instead of exposing iterators.

Reviewed By: @markw65

Differential Revision: D1709881