How to deal with my results being stolen?
How to initiate cooperation with new people and still avoid this
  problem?


You need some basic trust in the people you want to cooperate with before starting to share ideas. In some cases, you might know coauthors of them. Talk to them and hopefully they will drop hints on whether the collaboration was fair or if you need to be careful. I have indeed gotten warnings from other researchers (inside my own institute) regarding who I can trust and who tries to steal ideas. And I also pass on such information (after validating it) to new researchers.

But most important: Before starting any serious exchange of information, define basic rules for all of you. For example, anything which is developed throughout this collaboration must only be published with everyone agreeing to it. Create proof of this via a digitally signed email.

Of course, you might not be able to fully trust ANY person. So take care and create proof of your initial ideas. I tend to create repositories with revision-tracking (via GIT or SVN) of the joint work during collaboration. Everything should be stored therein, for example, any paper that you are writing or simulation data. Even if you get into trouble later on, you can proof, WHEN and WHAT you contributed.