A 12-year-old boy who threw stones at police during rioting outside a mosque has become the youngest person to be sentenced so far over far-right riots that erupted in England this summer.