European Union lawmakers have backed plans to fine Facebook, Google, Twitter and other online platforms if they fail to remove extremist content within one hour.