Refactored the code to use new service manager.

* Added a simple service manager.
* Added an abstract WorkflowService
* Implemented a MakeflowService.
* Refactored Makeflow to not generate shell scripts.
* Other minor improvements.
Removed scheduler import which has yet to be checked in.
Added attribute checking to  __enter__ method.

The __enter__ method will check if the file
object exists and returns either the object
or None.
Fixed code to support python 3.

In python 3 itervalues() has been removed
from dictionaries with values().
Added support for makeflow_format option.

Arguments will be shorten to a basename when the
makeflow_format is set to 1.
Makeflows now generate a logfile.

A makeflow will generate messages into
the logfile when the workflow has started
and completed.
Updated workflow queuing and added persistence.

* A workflow is now persisted to file.
* Previously run workflows are fetched from file.
* A duplicate workflow will not be added to the queue.
* A duplicate workflow will attach to the currently
  running workflow.
Removed sleep from main loop.

* The recv already blocks meaning the sleep was not needed.
Added new internal service for status codes.

* The Service base class now has a initialize method.
* The Status code service allows easy access to status
  codes and status message. This can be achieved by
  calling service.STATUS to access the code or
  service.STATUS_MESSAGE to access the status message.
Refactored code to use status codes.

* Added MakeflowLog for better handling of makeflow logs.
* Makeflow logs can now be parsed into a graph structure
  for further analysis.
* MakeflowLog class is now used to check the status of a
  current makeflow.
* Workflow scheduling now returns a status message.
* Workflow persistence has been disabled.
* A job can now be overwritten.
* When a workflow fails to be generated it now returns None
* A Makeflow log is checked before running a makeflow.
* Cleaned up code for using new StatusService.
ff-only