PAC Ranking from Pairwise and Listwise Queries: Lower Bounds and Upper Bounds