MAGNET: Augmenting Generative Decoders with Representation Learning and Infilling Capabilities