Fix faulty bool types in custom GLUI code.
Fix using-directives used before includes.
Remove some unused variables.
Fix incorrect comparison-as-assignment.
Fix an overloaded virtual function.
Silence an uninitialized variable warning.

This is not a real bug since the if() condition tests for j>0 and fj_1
is set in the first iteration and therefore initialized for all j>0.
Merge branch 'glui236'