An independent Islamic faith school that requires girls as young as seven to wear hijabs is to become state funded.