armv8crypto: Factor out some duplicated GCM code
This is in preparation for using buffer cursors. No functional change
intended.
Reviewed by: jhb
Sponsored by: Ampere Computing LLC
Submitted by: Klara Inc.
(cherry picked from commit 0b3235ef743d1561c57989042b3c364a5a955f4f)