Media regulator Ofcom has outlined measures designed to prevent people from downloading music and film content illegally from the internet.