Apple beats expectations in historic Q4 earnings