The nilpotence class of core-free quasinormal subgroups