CRM-13161, added unique names for prefix_id, gender_id and suffix_id, also code cleanup and related fixes

----------------------------------------
* CRM-13161: Greetings are  not evaluated correctly if it includes prefix / suffix
  http://issues.civicrm.org/jira/browse/CRM-13161
CRM-13161, more cleanup/fixes for advanced search - search view

----------------------------------------
* CRM-13161: Greetings are  not evaluated correctly if it includes prefix / suffix
  http://issues.civicrm.org/jira/browse/CRM-13161
CRM-13161, fixed token evaluation

----------------------------------------
* CRM-13161: Greetings are  not evaluated correctly if it includes prefix / suffix
  http://issues.civicrm.org/jira/browse/CRM-13161
Merge pull request #1477 from kurund/CRM-13161

CRM-13161