Ultraslow Kuznetsov-Ma solitons and Ahkmediev breathers in a cold three-state medium exposed to nanosecond optical pulses