A coroner has attributed “avoidable delays” and A&E bed-blocking to the deaths of two people - and has warned more could occur if action isn’t taken.