Recent progress in three-terminal artificial synapses based on 2D materials: from mechanisms to applications