Near-optimal Regret Bounds for Reinforcement Learning in Factored MDPs