I called IRS just now and this is indeed a tricky question since we spent about 30min on it. Here is the final results:
1. A B2 visa holder IS ELIGIBLE to take the Substantial Presence Test, and can claim all the days he/she was in the US to use for the Substantial Presence Test, EXCEPT FOR the days outlined on Page4 of Pub519. - THIS IS SPECIFIED IN THE INTERNAL MENU FOR IRS CALL CENTER EMPLOYEES.
2. If a B2 visa holder PASS the Substantial Presence Test, then he/she is considered a 'US resident' - here this term is used for IRS tax purpose, it is different from the immigration terms. The term 'US resident' is the same as 'resident', or the 'resident' word in the term 'resident alien'. IRS documents use these words in different places but they mean the same.
3. If a B2 visa holder CAN be considered a 'US resident' per above two points, then he/she has PASSED the Citizen or Resident Test, which is one of the FIVE tests a Qualifying Relative has to pass before he/she can be claimed as a dependent.
4. Natually, once a B2 visa holder HAS PASSED the Citizen or Resident Test, he/she still has to be a Qualifying Relative, AND PASS the other 4 tests for dependent, before you can claim he/she as a dependent.
IS IT CLEAR FOR YOU NOW? This is the official answer from the IRS so let's all follow these rules.
BIG THANK TO EVERYONE WHO CONTRIBUTED TO THIS DISCUSSION!