Theory of nematic charge orders in kagome metals