Geometrically necessary dislocations in viscoplastic single crystals and bicrystals undergoing small deformations