Document set_state_callbacks and,
make load_state callback support promises.