Leicester City and Leeds United were relegated to the Sky Bet Championship after Everton beat Bournemouth to preserve their top-flight status on a dramatic final day of the Premier League season.