Revealing the cosmic evolution of boxy/peanut-shaped bulges