build: add ServiceFactory.lua.

N/A

ServiceFactory.lua: Implement to create a service for gotoos use Factory Pattern.

Signed-off-by: liminghao <liminghao@xiaomi.com>