Geometric and electronic structure of graphene bilayer edges