Add color constraint(Step two) and some update

1. constraint:When filling a corner cubie, after fill two color, auto
fill third color.
2. Add inference engine close function.
3. Add check completion function.
4. Move magic cube state variable to working memory.