Where the insurer pays for a total loss, either of the whole, or in the case of goods of any apportionable part, of the subject-matter insured, he thereupon becomes entitled to take over the interest of the assured in whatever may remain of the subject-matter so paid for.