Reduce object allocations in Ransack::Nodes::Sort

`try` allocates an array on every call; we should avoid calling
it in hotspots.