Electrical current distribution across a metal–insulator–metal structure during bistable switching