A direct optimization approach to hidden Markov modeling for single channel kinetics.