M&S slumps to first loss in public firm’s history