An accelerator-based cold neutron source