While I work in Education City, I am not employed directly by Qatar Foundation but expats I know who work for them are generally happy. I would take the accomodation because the cost of renting a place in Doha, especially one comparable to what you will have with the Qatar Foundation, will be VERY expensive. Qatar Foundation is just finishing another phase of housing within Education City and I am told that the facilities are very nice. As for job security, I think it depends on the field. I have heard of people who were Qatarized because a Qatari was placed in their position but I don't know the specifics of how that works. I met a person from Qatar Foundation whose position was scheduled to be taken by a local person but the people at Qatar Foundation liked him so they gave him a different position. I would say if you have a contract you would be safe until it is time to renew the contract and if they are really happy with your work, then that is an additional level of security.

Good Luck