Four people, including two police officers, have been killed in a mass shooting in the Canadian city of Fredericton, the capital of the eastern province of New Brunswick.