Phfit: A general phase-type fitting tool