Adds _distribute_homeless_shares

If homeless shares exist, _distribute_homeless_shares is called
in order to find homes for the shares. If possible a homeless share
is placed on a server it is already on, signifying that the share
should be renewed instead of being uploaded to a new server.
Otherwise the function attempts to distribute the shares as evenly
as possible over the available peers.

_calculate_happiness has been refactored to keep track of homeless
shares to minimize iteration over the new mappings.