Added error checking on FP.sort. Fixes #71

Added checks for FP.sort and FP.sortBy to do nothing on objects with
length less than 2 to prevent crashes and speed up simple sorts.