Fix up the order of capable-switch resources

When multiple logical switches are configured, LINC produces
capable-switch resources in the following order:

    ports for logical switch 1
    queues for logical switch 1
    ports for logical switch 2
    queues for logical switch 2

According to OF-Config 1.1.1 XML schema, it should be:

    ports for logical switch 1
    ports for logical switch 2
    queues for logical switch 1
    queues for logical switch 2
Accept 'undefined' in of_config_encoder:sort_resources/1

With this change, the unit tests pass.