Quantifying realized inbreeding in wild and captive animal populations