Correct cast_from_entity_to_all_roles (@benjello: makes indemnite_residence work).
Rework test_cotsoc_fonc, then comment out variables that don't work yet, to ensure that Travis tests succeed.
Correct main function of core tests.