Spain's Senate has approved legislation allowing King Juan Carlos to abdicate this week and hand the throne to Crown Prince Felipe.