Cleanup base64 encoder, fix alligned EOF problem
Cleanup base64 encoder, fix alligned EOF problem

 - Use inline helper for splitting sextuples & encoding
 - Correctly handle case where flush is set and the input
   is a multiple of 3

Signed-off-by: David Oberhollenzer <ef97309e490485c1bad5018f0617d7fa37bc07ac@tele2.at>

AgentD/ctools,AgentD/ctools,AgentD/ctools