during the 1800s, how was Japan able to remain independent when European countries had gained control over many of the other Asian countries