modem/freqdem: initializing internal carrier frequency
buffer/window: fixing memory issue with copying tail end of buffer

  * had copied one more element than necessary
  * only occasionally read one element outside of bounds
  * technically this wouldn't ever cause any issues
buffer/window: resetting entire memory array in clear()
buffer/window: cleaning up code, adding useful comments