Mean field theory of superglasses