Add a test of encoding multiple spatial layers

This increases the coverage of the unit tests.
Merge pull request #522 from mstorsjo/layered-encoding-test

Add a test of encoding multiple spatial layers