writerfilter: convert gperffasttokenhandler to Python

Change-Id: I56ae09cb89da7d078f64906e15677de58296c119