Allowed passing null or undefined to $location.search as the only
argument; now it will reset the search object to be an empty object,
rather than null or undefined.