Internal refactor apis and document code

Internal refactor apis to avoid IQueryDefinition.setAutoBinding 
and comment on code

Signed-off-by: sguan <sguan@actuate.com>