dirmngr: improve VERSIONCHECK
Replace strtok_r() and code formatting. Use code from libgpg-error for version comparison.