implemented some extra requirements from CppAD for CG<double>
improved detection of linear index sections
improved detection of linear index sections (forgot to commit a file)
initial work on first order forward mode with loops (WIP);
improved source code generation of jacobian using forward/reverse mode functions by using a pointer to a locaton in jacobian array as an argument in forward/revere function call whenever possible;
some reorganization to improve reusage