Fixed compiler warnings (detected by VC++):
- Removed not used variables
- Added casts
- Fixed wrong assignments to bool
- Fixed wrong calls with bool arguments
- Added missing argument to store(longlong), which caused wrong store method to be called.
1. Made sure that base64 string is terminated with NUL.
2. Made calculation of needed size for base64 string exact.
Added checks in test for the above two fixes.