Reworked PrimeFactors, added COUNTER_MAILBOX_QUEUE_MAX

New counter records the maximum number of messages seen in any mailbox
message queue.