* Add accepting of wallet gift cards
* Split function by two, move bot-related parts to Bot.cs, better xpath
* Remove unneccessary warning
* Forgot to remove beginning chars
* Request data to separate variable, session request in GetDigital..., variable renaming
* Modify XPath a bit to make it more understandable
* Move substring call further, length checking
* Implement semaphore and queue
* Fix typo
* SessionID comment, entries are in alphabetical order
* Add a few spaces to xpath
* Logging: warning -> error
* Dispose GiftCardsSemaphore
* General formatting fixes
* Final formatting fixes, HandledGifts check
* AcceptGifts config value handling
* Handling 0 in function argument
Initially the issue was observed in #697, but that itself wasn't exactly what was fixed here, as multiple evaluation of the same trade is still wanted scenario.
The real issue was reported in http://steamcommunity.com/groups/ascfarm/discussions/1/2425614539578192287/
In a huge TL;DR, Steam is now sending trades notification each time something fetches current trade offers, be it ASF, the user, or some other script.
This will lead to possible ASF trade loop, as we'll get wanted notification about new trades, fetch them, leave some trades untouched, get new notification about trades and so on.
Initially I wanted to fix this in dirty way by just ignoring any extra notifications that happened since API call until 5 extra seconds after we were done with entire parsing, but I found much better solution - Steam actually includes extra info about amount of trades/items in notification (makes sense, since Steam client displays that info too). We can make use of that info and simply ignore any extra notification that results in same or smaller count.
Thanks to that we didn't only add a decent workaround for this recent Steam fuckup, but we also improved internal ASF code that will no longer schedule extra parsing if we accepted/rejected only some of the trades, making me happy with the actual solution.