Algorithms for the state probabilities and waiting times in single server queueing systems with random and quasirandom input and phase-type service times