Fixed some bugs in the EM code.  There still seems to be a bug, because the log likelihood sometimes decreases a little.  Also implemented restarting in EM and estimating pi (the initial state distribution).