fix bug in rendition sort algorithm to include a fallback sort by bandwidth in the case of same resolution renditions if available and add tests