Kernel-Based Reinforcement Learning in Average-Cost Problems: An Application to Optimal Portfolio Choice