[Reviewer: Alex] Utils update

Alex, can you review these changes to add(/move into cpp-common) a couple of utility functions.
I've also moved some of the fake* files used in UTs into cpp-common
I don't think this provides valid base64 (unless `length` is a multiple of 4) as the last character may contain incorrectly set bits. Also you don't use  padding characters which are fairly standard.