Significantly reduce duplicate layer scanning code
The layer scan functions had a pattern of calling loader_get_data_files,
parse the json found, and put the resulting parsed loader_layer_properties
into the output instance_layers list. This pattern was done twice in each
layer scan function, so in total 4 times. Thus, it was ripe for pulling the
common code into a new function, loader_parse_instance_layers().
The one bit of logic not shared between the two paths is whether or not the
layers being scanned are implicit or explicit. This is made easy by the fact
that the manifest_type dictates whether to parse the scanned manifests as
implicit or explicit layers.
Also, the code to get the override path was identical - but was copy pasted.
Moving it into a separate function cleans up the functions quite
siginificantly.