The three-level coupled Maxwell-Bloch equations: rogue waves, semirational rogue waves and W-shaped solitons