Micromorphic theory and its finite element formulation