firmware-utils/tplink-safeloader: refactor code for further board support