[sliceable_switch] fixed config.cgi to meet the API Spec

Fixed create_attachment_on_port() in config.cgi to meet the
REST-API specification [1].

"POST /networks/existing/ports/non-existing/attachments"
According to the REST-API specification [1], the response for
a POST request to create an attachment object to non-existing
port object, should be "422 Unprocessable Entity". However,
the response was "202 Accepted". Now, the response is "422
Unprocessable Entity".

This patch also includes tests of REST-API to configure ports.

[1] https://github.com/trema/apps/wiki/Sliceable-Network-Management-API#create-an-attachment-object-to-a-port-object