Split the Facet Core into Core and ApiCore

Signed-off-by: license2e <ilya@shindyapin.com>