Gold rallies on weaker dollar, Japan ratings cut