The structure of experience and the foundations of science: an evaluation, and modern application, of Kant's views on metaphysics in its relation to science, as set out in the Critique of pure reason and the Metaphysical foundations of natural science