Removes duplicates from the current array.
This is a destructive action, and will modify the array in place.
@param {Array} a The Array object to operate on.
@returns {Array<*>} The current array, with duplicates removed.
@function
function makeUnique (a) {
                    if(!(a instanceof Array)) return a;

                    var visited = [];
                    for(var i = 0; i < a.length; i++) {
                        if(visited.indexOf(a[i]) === -1) {
                            visited.push(a[i]);
                        }
                        else {
                            a.splice(i, 1);
                            i--; // Splice will affect the internal array pointer, so fix it...
                        }
                    }
                    return a;
                }