Handle an argument of 0 in ffs(), instead of looping indefinitely. Add an ffs prototype to dix.h, and add includes to ffs.c. (cherry picked from 34164e551e4c3909322d50b09835ca4ac1d49d68 commit)
Add missing prototype for ffs, and include headers from ffs.c. Move PostSyntheticMotion prototype to input.h.