You can use a 529 plan to repay up to $10,000 in student loans - but there are some caveats you need to know.