--fixed for CRM-12498, added condition to check valid contribution status change and throw error if invalid

----------------------------------------
* CRM-12498: API contribution.create/update DB Error: constraint violation
  http://issues.civicrm.org/jira/browse/CRM-12498
Merge pull request #804 from pradpnayak/CRM-12498

--fixed for CRM-12498, added condition to check valid contribution statu...
Ran the complete api v3 Contribution unit test w/o errors after applying this patch.