Feature: Flatten to a specific depth

This change allows flatten to take an integer as it's second argument
(formerly named "shallow"). I renamed the argument to depth. Backwards-
compatible with previous flatten because true and false are coerced to
1 and 0 respectively. This mimics the behavior of Ruby's Array#flatten.