Automated and Holistic Co-design of Neural Networks and ASICs for Enabling In-Pixel Intelligence