[lib] Add function to calculate padding size
Summary:
This diff adds a function to calculate file size after padding. It will be used in subsequent diffs.
The content is basically copied from actual padding functions.
Test Plan: Added unit test
Reviewers: atul, marcin
Reviewed By: atul
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D7222