Fixed "Type safety" warnings when using JDT methods returning collections.

ASTHelper.java:
Added methods returning generecized collections for ASTNodes.

*.java:
Used the methods added to ASTHelper.
Dynamically discover samples in RefactoringTest.
Verified that code before and after refactoring are equivalent for HotSpotIntrinsicedAPIsSample.