Royals erase four-run deficit, defeat Brewers 6-4