Add takeWhile to Array

Adds takeWhile method to Array.
Iterates through the array and returns all elements up until an element fails the given condition.

[1, 2, 3, 4, 5, 2].takeWhile { $0 < 4 }
// → [1, 2, 3]