Implement Array#flatten(depth)

Right now the monkey patch on Array#flatten crashes code that tries to call flatten with a given depth. This pull request should implement it correctly.
It would be cool if you could release a new version with the patch in it :)

Thanks!
  Martin