Sol–gel derived, magnesium based ionically conducting composites