refactor for Codegen Routine

For OctaveCodeGen (pr #7824), I need some refactoring of `Routine`.

- [x] add Fortran matrix tests
- [x] add C matrix tests
- [x] move language specific stuff out of `Routine.__new__`

see this comment https://github.com/sympy/sympy/pull/7824#discussion_r17892414

On 30/09/14 03:42, Jim Crist wrote:
> `Routine` should still do it's own argument validation.

that sounds good in principle.  Comparing my `OctaveCodegen.routine`
(in #7824) and `Codegen.routine`, I'm not sure how much I can pull out
that is common.

Or maybe I've misunderstood?  Do you mean things like `arguments` must
be {OutputArgument, InputArgument, InOutArgument}?  Can you give me a
fragment of the sort of "validation" you have in mind?

> `routine` function may make some assumptions about intended
> behavior that `Routine` won't. In my mind, `routine` is the "easy"
> access. Give it a tuple of symbols, an expression, and a language,
> and it returns the most likely setup. For example, `C` would change
> matrices inplace, while `octave` would return them. But if a user
> wanted to initiate a routine in octave that modified a matrix in
> place, they still could by creating the routine using the `Routine`
> class directly.

+1, the documentation suggests this is the case, that the CodeGen
object should raise CodegenError if it cannot comply.  This will
require further testing: it probably breaks my Octave stuff for
example.  But perhaps we can work towards that...