Amazon's strong holiday sales pushed quarterly profits and revenue above expectations, but its first-quarter forecast fell short of estimates.