Restructuring of the electrical double layer in ionic liquids upon charging