Online messaging services such as WhatsApp will face tougher rules on how they can track users under a proposal presented by the EU.