Macbook Pro Ram and/or Processor broken? I am experiencing several problems with my MacBook Pro early 2011.

It all started about two months ago with my wifi card. It lost connection to the network every few hours. The symbol in the status bar of MacOS X kept showing that I am connected, but there was no network connection. When I tried to disable and enable again I could not enable it anymore until I rebooted. This behaviour occurred in the beginning approximately every two or three hours and in the end it happened minutes after rebooting. Now MacOS shows most of the time, but not always, a wifi symbol with a white x in the middle.

About three weeks ago, it started that I could not send my MacBook to sleep anymore. In the beginning I investigated the problem only a little bit, tried to create a new user account and see if this user could send it to sleep, but that did not work. Three days ago, I read more about this problem and Apple says you should try booting safe mode and see if it can go to sleep in this mode. I tried it, it did not work and when I tried to boot back to normal mode I got a “prohibited sign” after I saw the Apple Logo while booting.

I tried to reinstall Mac OS X on the partition on which it was already installed to keep my personal files, but the installation got stuck and failed. I made a backup of my files and did a fresh installation which also failed when I did it using the recovery partition. I tried it again from a USB drive installer and it worked. 

After that I used the Apple Hardware Test and the quick test found a memory error: 4MEM/9/40000000: 0x83b52598 I upgraded the RAM on my own years ago with two 4GB chips. After the test I replaced one of the chips with one of the built-in 2GB chips and neither the quick nor the extended test failed. After one day of working with my MacBook I did again three more extended tests, out of curiosity. The first one of these failed with an 4MEM/62/40000000 0x838da618 the other two, I did them several hours later, succeeded without errors.

During the backup process (before replacing the ram) I booted Ubuntu from a USB drive and two out of five or six boots stopped with a couple of errors, I will attach a screenshot of these errors. 

Are these errors also RAM related or might it also be a broken processor? 

What can break a memory chip? Is it normal that this happens from time to time? 

Thanks for your help.
While hard drives are the most likely component to die in any computer, memory can and does fail from time to time. An "Early-2011" model will be nearly four years old now so it's worth considering an HDD replacement at some point (these were some of the first systems to feature SATA-III controllers so you will be able to take full advantage of current SSD speeds).

However, if AHT is detecting memory issues then that's the area to focus on. Booting from USB is obviously independent of any potential hard disk issues and boot failures are nearly always guaranteed to be down to memory issues.