Charge-coupled devices in astronomy