* Added new operation hasSubstitutes(), which is more efficient than querySubstitutes().size() > 0.
* Some refactoring: put the NAR archive integer/string serialisation code in a separate file so it can be reused by the worker protocol implementation.