Add hook_civicrm_preProcess function.

This seems to be a generically useful spot to intercept the form object and
change things before the form is processed. Specifically, we need this hook
for integrating the Event Cart with the CiviDiscount extension.
Porting over of this patch from another Civi instance failed miserably.

This commit includes the full preProcess hook definition and fixes the syntax
error.
Update the hook invoke method to follow the CiviCRM 4.5 conventions for
invoke.
Search Filter for Activity Type in Case Mgt screen does not display activities where component is Contacts AND Case
CRM-15595 - Individual sub-type custom fields don't appear in online event registration

https://issues.civicrm.org/jira/browse/CRM-15595
CRM-15594 Fix alignments on Merge Rules page
CRM-15611: fix send copy for case activity
Merge pull request #4576 from yashodha/CRM-15611

Tested, works fine
Merge pull request #4572 from atif-shaikh/CRM-15595

CRM-15595 - Individual sub-type custom fields don't appear in online eve...
CRM-15595 indentation fix

----------------------------------------
* CRM-15595: Individual sub-type custom fields don't appear in online event registration
  https://issues.civicrm.org/jira/browse/CRM-15595
Merge pull request #4577 from monishdeb/CRM-15595

CRM-15595 indentation fix
Encourage better scoping of js CRM vars with new addVars method
CRM_Utils_Array - Remove old unused functions
Merge pull request #4509 from colemanw/addVars

Encourage better scoping of js CRM vars with new addVars method
Add test for CRM_Utils_Array::remove
Merge pull request #4579 from colemanw/CRM_Utils_Array

CRM_Utils_Array - Remove old unused functions
Merge pull request #4574 from rohankatkar/CRM-15594

CRM-15594 : Fix alignments on Merge Rules page
CRM-15594 Fix alignments on Merge Rules page
Merge pull request #4581 from rohankatkar/CRM-15594

CRM-15594 Fix alignments on Merge Rules page
Fix for CRM-15594