Fixed some compiler warnings in fortran code

Fixed a variety of compiler warnings
Gave up on the -Wmaybe-uninitialized warnings in dqagse.f --- there are far too many GOTOs in that file to understand what it is doing.