Integrated resource recovery from aerobic granular sludge plants