Ten people accused of attacking education activist Malala Yousafzai when she was just a schoolgirl in Pakistan have been sentenced to life in prison by an anti-terrorism court.