Rapid synthesis of novel Cr-doped WO3 nanorods: an efficient electrochemical and photocatalytic performance