Hargreaves Lansdown agrees £5.4bn takeover