Direct observation of the three-state folding of a single protein molecule