Qld schoolboy wins long hair court battle