Outlines of a Philosophy of Religion based on Psychology and History