Wall Street ends down, Apple falls on app store ruling