Martin Kaymer survived a late wobble to claim a dramatic one-shot victory in the Players Championship at Sawgrass.