Following a high court challenge by the Public Interest Law Centre, the homelessness charity St Mungos apologises