Origins and Consolidation of Field Theory in Nineteenth-Century Britain: From the Mechanical to the Electromagnetic View of Nature