Fixes #125: Add example of external/function decorators

This pull request adds an example of using the `cocotb.external` and `cocotb.function` decorators to co-simulate a HAL with a test.

To do this I've added a `hal` directory to the endian_swapper example which contains a simple HAL with a few functions for controlling the device via register the register map.  In theory this could run on a NIOS etc. but I haven't actually tested it.

I created a `cosim` directory to hold all the non-hal related things.  In future some of this should probably be made common infrastructure and migrate to `libs`, but I think it's OK for now.

Makefile probably needs review, again it's a little quick and dirty.