AMENDED AND RESTATED RIGHTS AGREEMENT by and between ADVANCED PHOTONIX, INC.