ipatests: make encoding to base64 compatible with python2
base64.encodebytes is present only in python3, but base64.encodestring
can be used both in python2 and python3 to encode byte-strings.
Relates https://pagure.io/freeipa/issue/7857
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>