All-carbon photodetectors