Add input argument "type" in "gradient.R"

Add argument "type",
whose default value is "gradient",
which returns partial derivative for each parameter.
Fix a bug in "gradient.R"

Fix a bug in "gradient.R" which returns a wrong value for
gradient with respect to coefficient matrix.

Modify "gradient_test.R" in "test/" correspondingly.
Add FIM return in "gradient.R"

Add optional value "fim" to input argument "type" of "gradient.R"
The return value will be Fisher Information Matrix with this argument
given.

Modify "gradient_test.R" in "test/".
Add comments to "gradient.R"