Douglas Adams said it was the answer to the meaning of life, the universe, and everything. He meant it as a joke, but a new book shows how the number 42 has played a significant role in history