The ‘religious atheist’ author held a reputation as CS Lewis’s opposite. But his two trilogies – which came to a close this year – were a celebration of humanity and imagination ...