Fix programming errors in hr modules

Fixed 2 programming errors in hr modules that make tests crash on other modules.

The first one is in hr_simplify. The file refers to the field 'state' on contract (hr.py line 159). But the field does not exist in this module or modules which it depends on.

The second error is in hr_job_category. It inherits the method write on contract and makes computations without validating the data passed to the method.

These modules obviously need unit tests.
You can do self.assertEqual(res[self.job_id]['no_of_employee'], 1)