Captain Rizwan produced a remarkable unbeaten century, ending on 122 as Pakistan chased 355 with an over to spare in Karachi.