Charge ordering and elastic anomalies in NaxCoO2