rename posteriorDensity -> posterior
fix typo in doc
allow traj=NULL in doc