refactor(expand): optimize line processing and UTF-8 handling
- Replaced line-by-line processing with byte stream processing for better performance
- Added ExpandState struct to track column position and line initialization state
- Implemented UTF-8 validation with configurable incomplete UTF-8 handling
- Added READ_BUF_SIZE constant for consistent buffer sizing
- Optimized UTF-8 character length calculation with utf8_expected_len function
- Improved tab expansion logic with stateful column tracking
- Enhanced error handling for incomplete UTF-8 sequences