Simply allow players to sell an item at its full cost provided that:
If it is before 1:30 and the player has not been hit by an enemy champion or turret, hit anything with an ability/attack, or used a summoner spell.
After 1:30, items can be sold at full price provided the player has not left the base (inhibitor turrets), and have not been hit by an enemy champion or turret, hit anything with an ability/attack, or used a summoner spell.
"Hit by an enemy champion," clause does not apply if you have not left the base pad. You just know some poor sap would get hit by ezreal as they miss-clicked.
EDIT: I guess I didn't make this 100% clear: The no combat clause is only since buying the item. You can refund items any time during the game, but after 1:30, you can't leave your base before doing so. Also, another abuse to be prevented: You may not refund an item if you've used its active ability.
Refunded items are broken down into what they were previously, if it was a combination item.
Refunding items also causes the player to lose any gold generated by them (philosopher's stone).
That should solve all the issues without allowing any abuse. It would be very hard to walk past your inhib turret before realizing you messed up.