Improvements/1977 promise.empty

see #1977

This pull request include commits of #1998 because the first one bootstraps tests for F.Promise. I didn't want both to conflict. Thus, please don't merge before #1998 gets merged.