sort_asc and sort_desc: removed unecessary size vector checks and added some unit tests
Fixed rank(v,s) unit test warning of implicit convertion from double to int.