Model direction of ports, etc, using two boolean attributes, in/out.
The direction attribute remains as derived and read only. - fixes #409