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.
@pedrobaeza I agree. I pushed the change. Thanks!