Once a fusty way of keeping moths out of clothes, Brian Clegg explains how naphthalene may have helped bring life to Earth