A paranoid schizophrenic who carried out a machete attack in a crowded Bradford mosque has been detained in a secure unit for the protection of the public.