Excitons in gaseous and solid neon