improve the serialization of custom user models

(cherry picked from commit 7b34eabe4b506c3e49e4dedbefee66c1612bb83d)
[#3307] Adding an additional note about deserialization issues

(cherry picked from commit 7325ec5044c0339275a9700e767d88707116f79d)
[#3307] Fix thanks to @xabbuh

(cherry picked from commit 38612bc190ab2f97f2fbd3f3bc18a591df153cbe)
Clarifying some details on serialize/unserialize and making it consistent with changes we recently made

(cherry picked from commit f285c5a572ee88e94a9314e152a5075243811d49)

Conflicts:
	cookbook/security/entity_provider.rst
Changed sha1 into bcrypt
[#3356] Fixing ticks that don't work inside a bold and removing extra details in intro area that aren't necessary (you'll need to read the cookbook entry for more details anyways)
[#3356] Changing to use the bcrypt algorithm

Also removing one example (now possible with using bcrypt from the beginning) and related tweaks.
[#3356] Moving serialize and Equatable logic further down for clarity
[#3356] Clarifying when you need a salt

Also filling in other details related to using BCrypt
[#3405] Tweaks thanks to @WouterJ and @xabbuh
Merge pull request #3405 from symfony/security_fix_extended

Changed sha1 into bcrypt continued...
Merge branch '2.2' into 2.3

Conflicts:
	book/security.rst
	cookbook/security/entity_provider.rst