Deletion-contraction techniques for the chromatic symmetric function of a graph