Johanna Konta reaches the US Open quarter-finals for the first time by edging an unpredictable match against Karolina Pliskova.