Recursive loader refactor

Overhaul of the style loader to handle recursive `@import` rules.

Also added tests.