Extend `inv()` and `solve()` to accept an additional parameter, `method`

User can set `method` parameter to specify the method to be used in
inversion or solving a system. For inv(), `method` can take one of the
following values: 'LU', 'FFLU' or 'GJ'. For solve(), `method` can take
'LU', 'FFLU', 'LDL' or 'FFGJ'. Default value is 'LU' for both the methods.

LU = LU factorization
FFLU = Fraction free LU factorization
GJ = Gauss Jordan
LDL = LDL Factorization
FFGJ = Fraction Free Gauss Jordan