Refactor lineardoc module to multiple small files

Bug: T76000
Change-Id: Ie32986ffcdaf84ef90c12a71f77c85f9d16a30ba