The Canadian government’s computer networks have, in the past, been hit by state-sponsored cyber-attacks about 50 times a week, and at least one of them usually succeeded, according to the secretive agency charged with preventing such attacks.