Nearly 39,000 child sex abuse image crimes were recorded last year - with an unacceptable loophole in the law leaving children vulnerable on messaging services, says the NSPCC.