Call goog.array.removeDuplicates only when needed

Small `ol.Object#getKeys` optimization