remove typeof from choose_pivot(...)

It's not making any sense to use typeof(i) to define length, since 'i' is obviously a 'int'. And it's probably not a good idea to put the choose pivot function in a separate file, this will force user to call srand() unnaturally.