Paul Imhof, Theologe und Philosoph