Reorganise ResourceLayer implementation.
Support soft edges on D2K spice tiles. Fixes #2247.