core: add unit test for legality of capturing surrounding stones