Static Einstein-Maxwell magnetic solitons and black holes in an odd dimensional AdS spacetime