Implemented the memory and wb stages

The memory and write back stages are implemented but have not been fully
tested. Having some trouble with dispatching instructions only when the
current instruction has finished.