fix loop index warnings

   * thanks to pkhuong's suggestion, remove loop index type declarations
   * wrap 1- calls in loop indices with (logand most-positive-fixnum)