Added arguments for madlib.summary

Also added an option to let user choose whether to realize factor in
db.Rquery