Best quality photo is the Pixel and Pixel XL which are currently available for pre-order. You also get top notch photos from the Samsung S6, S7, S7 Edge, Note 5 and Note 7 as well as the HTC 10, Moto Z Force, LG G5 and iPhone 7 Plus.
The highest resolution that I'm aware of was that Nokia with the 41MP camera, which I believe was the 1020. From a resolution standpoint that's HUGE, but from a quality standpoint, it's currently ranked in a 3 way tie for 39th place of phone cameras evaluated. It was fairly terrible at color reproduction and at capturing motion in low light but excellent at still shots in great lighting conditions as long as the user was capable of setting up the shot to avoid flare.