remove dependency on openssl for base64 encoding; use common crypto for sha1 on osx
EntityPtr -> Entity::Ptr, interface changes to base64 and sha1
fix backward operator when writing entities to database
revert Entity::Ptr -> EntityPtr