FT-258 Move cursor code to ft/cursor.h and ft/cursor.cc