Solving the chemical master equation for monomolecular reaction systems analytically