fix debug code left in flexcache.cc.  cleanup some compiler warnings in debug build.