Move bit operations from HOAS to Frontend.
Remove imports of FOASCommon.
A bit of cleanup in Core.hs.
Fix typo.