Online Cyber-Attack Detection in Smart Grid: A Reinforcement Learning Approach