Foundation Models for Time Series Analysis: A Tutorial and Survey