Split src/paperwork/util.py between backend and frontend

Signed-off-by: Jerome Flesch <jflesch@wyplay.com>