Add name method to generated algorithm source

This is mostly a code review ticket, but you should probably create a dummy algorithm with it just to make sure it works.

This was originally [#10386](http://trac.mantidproject.org/mantid/ticket/10386)