Early last year, big bets started to go wrong for a Japanese giant of toilets and faucets.