A tale of two smartphones: HTC forecasts its first-ever loss, and Samsung its biggest-ever profit