Two new exhibitions at the Freer|Sackler vividly illustrate Japan’s arrival to the modern age