Everton have appointed Roberto Martinez as their new manager, signing a four-year deal at Goodison Park after leaving Wigan.