Added sortperm!

* Allows preallocation (and therefore, reuse) of an index array
* Useful for https://github.com/JuliaLang/julia/pull/8316#issuecomment-60220521

One change which I'm unsure of here is loosening the types allowed for `lt(p::Perm, a, b)` from `Int` to `Integer`.  I did it with the idea that, if a user is providing a preallocated array, she could choose to use a different integer type (e.g., a large `Int32` array might have better cache performance than `Int64`).

That said, restricting the `sortperm` array type to `Vector{Int}` would be fine as well.  Thoughts?

Cc: @ViralBShah, @StefanKarpinski 
Yeah, I think that should be fine. I actually started with that, and then changed it for some reason that I forget.